Skip to content

Implement QVariantValue for QList<QString> - #1482

Merged
ahayzen-kdab merged 3 commits into
KDAB:mainfrom
yuknig:qlist_qstring_qvariantvalue
Aug 17, 2026
Merged

Implement QVariantValue for QList<QString>#1482
ahayzen-kdab merged 3 commits into
KDAB:mainfrom
yuknig:qlist_qstring_qvariantvalue

Conversation

@yuknig

@yuknig yuknig commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Add a QVariantValue implementation for QList<QString>.

QStringList already has an implementation, but in Qt 5 QStringList is a subclass of QList<QString> but not an alias for it. So, these two are distinct types and each needs its own implementation.

@yuknig
yuknig force-pushed the qlist_qstring_qvariantvalue branch from 88ebb22 to ccd6fe5 Compare August 16, 2026 19:59
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2ec40ea) to head (b7ddeea).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1482   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           75        75           
  Lines        13484     13484           
=========================================
  Hits         13484     13484           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

yuknig added 3 commits August 16, 2026 23:58
These  additional arguments are needed to make the script work with non-primitive types.
Although QStringList already has an implementation, QList<QString> and QStringList are distinct types in Qt 5 and require separate implementations.
@yuknig
yuknig force-pushed the qlist_qstring_qvariantvalue branch from ccd6fe5 to b7ddeea Compare August 16, 2026 21:59

@ahayzen-kdab ahayzen-kdab left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and tests seem to pass for both Qt 5 and Qt 6. Assume there isn't any confusion between QList and QStringList when you retrieve on the Rust side as they are an alias in Qt 6 so the "same" anyway, it's only Qt 5 where this can be fun ?

@ahayzen-kdab
ahayzen-kdab added this pull request to the merge queue Aug 17, 2026
@yuknig

yuknig commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Thanks!
Yes, in Qt6 they are the same type. In Qt 5 however, QStringList inherits QList<QString> and has a separate meta type.

Merged via the queue into KDAB:main with commit e7efa89 Aug 17, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants